package day_2022_7_to_8.day48;

/**
 * @author haomin
 * @date 2022/08/29 08:21
 **/
public class Day44_1_Num1470_Shuffle {
    class Solution {
        public int[] shuffle(int[] nums, int n) {
            int[] newArr = new int[n*2];
            int l = 0, r = n;
            for(int i = 0; i < n*2-1; i+=2){
                newArr[i] = nums[l++];
                newArr[i+1] = nums[r++];
            }
            return newArr;
        }
    }
}